﻿<ResourceDictionary
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:UIElements="clr-namespace:TfsWorkbench.UIElements;assembly=TfsWorkbench.UIElements" xmlns:Constants="clr-namespace:TfsWorkbench.TaskBoardUI.Constants">
	<ResourceDictionary.MergedDictionaries>
		<ResourceDictionary Source="CommonElements.xaml" />
	</ResourceDictionary.MergedDictionaries>
	<Style x:Key="ExpanderRightHeaderStyle" TargetType="{x:Type ToggleButton}">
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="{x:Type ToggleButton}">
					<Border Padding="{TemplateBinding Padding}">
						<Grid SnapsToDevicePixels="False" Background="Transparent">
							<Grid.RowDefinitions>
								<RowDefinition Height="19"/>
								<RowDefinition Height="*"/>
							</Grid.RowDefinitions>
							<Grid>
								<Grid.LayoutTransform>
									<TransformGroup>
										<TransformGroup.Children>
											<TransformCollection>
												<RotateTransform Angle="-90"/>
											</TransformCollection>
										</TransformGroup.Children>
									</TransformGroup>
								</Grid.LayoutTransform>
								<Ellipse x:Name="circle" Stroke="DarkGray" HorizontalAlignment="Center" VerticalAlignment="Center" Width="19" Height="19"/>
								<Path x:Name="arrow" Stroke="#666" StrokeThickness="2" HorizontalAlignment="Center" VerticalAlignment="Center" SnapsToDevicePixels="false" Data="M 1,1.5 L 4.5,5 L 8,1.5"/>
							</Grid>
							<ContentPresenter HorizontalAlignment="Center" Margin="0,4,0,0" VerticalAlignment="Top" SnapsToDevicePixels="True" RecognizesAccessKey="True" Grid.Row="1"/>
						</Grid>
					</Border>
					<ControlTemplate.Triggers>
						<Trigger Property="IsChecked" Value="true">
							<Setter Property="Data" TargetName="arrow" Value="M 1,4.5  L 4.5,1  L 8,4.5"/>
						</Trigger>
						<Trigger Property="IsMouseOver" Value="true">
							<Setter Property="Stroke" TargetName="circle" Value="#FF3C7FB1"/>
							<Setter Property="Stroke" TargetName="arrow" Value="#222"/>
						</Trigger>
						<Trigger Property="IsPressed" Value="true">
							<Setter Property="Stroke" TargetName="circle" Value="#FF526C7B"/>
							<Setter Property="StrokeThickness" TargetName="circle" Value="1.5"/>
							<Setter Property="Stroke" TargetName="arrow" Value="#FF003366"/>
						</Trigger>
					</ControlTemplate.Triggers>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>
	<Style x:Key="ExpanderUpHeaderStyle" TargetType="{x:Type ToggleButton}">
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="{x:Type ToggleButton}">
					<Border Padding="{TemplateBinding Padding}">
						<Grid SnapsToDevicePixels="False" Background="Transparent">
							<Grid.ColumnDefinitions>
								<ColumnDefinition Width="19"/>
								<ColumnDefinition Width="*"/>
							</Grid.ColumnDefinitions>
							<Grid>
								<Grid.LayoutTransform>
									<TransformGroup>
										<TransformGroup.Children>
											<TransformCollection>
												<RotateTransform Angle="180"/>
											</TransformCollection>
										</TransformGroup.Children>
									</TransformGroup>
								</Grid.LayoutTransform>
								<Ellipse x:Name="circle" Stroke="DarkGray" HorizontalAlignment="Center" VerticalAlignment="Center" Width="19" Height="19"/>
								<Path x:Name="arrow" Stroke="#666" StrokeThickness="2" HorizontalAlignment="Center" VerticalAlignment="Center" SnapsToDevicePixels="false" Data="M 1,1.5 L 4.5,5 L 8,1.5"/>
							</Grid>
							<ContentPresenter HorizontalAlignment="Left" Margin="4,0,0,0" VerticalAlignment="Center" SnapsToDevicePixels="True" RecognizesAccessKey="True" Grid.Column="1"/>
						</Grid>
					</Border>
					<ControlTemplate.Triggers>
						<Trigger Property="IsChecked" Value="true">
							<Setter Property="Data" TargetName="arrow" Value="M 1,4.5  L 4.5,1  L 8,4.5"/>
						</Trigger>
						<Trigger Property="IsMouseOver" Value="true">
							<Setter Property="Stroke" TargetName="circle" Value="#FF3C7FB1"/>
							<Setter Property="Stroke" TargetName="arrow" Value="#222"/>
						</Trigger>
						<Trigger Property="IsPressed" Value="true">
							<Setter Property="Stroke" TargetName="circle" Value="#FF526C7B"/>
							<Setter Property="StrokeThickness" TargetName="circle" Value="1.5"/>
							<Setter Property="Stroke" TargetName="arrow" Value="#FF003366"/>
						</Trigger>
					</ControlTemplate.Triggers>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>
	<Style x:Key="ExpanderLeftHeaderStyle" TargetType="{x:Type ToggleButton}">
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="{x:Type ToggleButton}">
					<Border Padding="{TemplateBinding Padding}">
						<Grid SnapsToDevicePixels="False" Background="Transparent">
							<Grid.RowDefinitions>
								<RowDefinition Height="19"/>
								<RowDefinition Height="*"/>
							</Grid.RowDefinitions>
							<Grid>
								<Grid.LayoutTransform>
									<TransformGroup>
										<TransformGroup.Children>
											<TransformCollection>
												<RotateTransform Angle="90"/>
											</TransformCollection>
										</TransformGroup.Children>
									</TransformGroup>
								</Grid.LayoutTransform>
								<Ellipse x:Name="circle" Stroke="DarkGray" HorizontalAlignment="Center" VerticalAlignment="Center" Width="19" Height="19"/>
								<Path x:Name="arrow" Stroke="#666" StrokeThickness="2" HorizontalAlignment="Center" VerticalAlignment="Center" SnapsToDevicePixels="false" Data="M 1,1.5 L 4.5,5 L 8,1.5"/>
							</Grid>
							<ContentPresenter HorizontalAlignment="Center" Margin="0,4,0,0" VerticalAlignment="Top" SnapsToDevicePixels="True" RecognizesAccessKey="True" Grid.Row="1"/>
						</Grid>
					</Border>
					<ControlTemplate.Triggers>
						<Trigger Property="IsChecked" Value="true">
							<Setter Property="Data" TargetName="arrow" Value="M 1,4.5  L 4.5,1  L 8,4.5"/>
						</Trigger>
						<Trigger Property="IsMouseOver" Value="true">
							<Setter Property="Stroke" TargetName="circle" Value="#FF3C7FB1"/>
							<Setter Property="Stroke" TargetName="arrow" Value="#222"/>
						</Trigger>
						<Trigger Property="IsPressed" Value="true">
							<Setter Property="Stroke" TargetName="circle" Value="#FF526C7B"/>
							<Setter Property="StrokeThickness" TargetName="circle" Value="1.5"/>
							<Setter Property="Stroke" TargetName="arrow" Value="#FF003366"/>
						</Trigger>
					</ControlTemplate.Triggers>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>
	<Style x:Key="ExpanderHeaderFocusVisual">
		<Setter Property="Control.Template">
			<Setter.Value>
				<ControlTemplate>
					<Border>
						<Rectangle Stroke="Black" StrokeDashArray="1 2" StrokeThickness="1" Margin="0" SnapsToDevicePixels="true"/>
					</Border>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>
	<Style x:Key="ExpanderDownHeaderStyle" TargetType="{x:Type ToggleButton}">
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="{x:Type ToggleButton}">
					<Border BorderThickness="0">
						<Grid SnapsToDevicePixels="False" Background="Transparent">
							<Grid.ColumnDefinitions>
								<ColumnDefinition Width="19"/>
								<ColumnDefinition Width="*"/>
							</Grid.ColumnDefinitions>
							<Border HorizontalAlignment="Left" Margin="0" Width="100" Background="{DynamicResource OtherItemsBackgorund}" BorderBrush="{x:Null}" BorderThickness="0" CornerRadius="0,0,5,5" Grid.Column="0" Grid.ColumnSpan="2" Effect="{DynamicResource DropShadowLevel1}"/>
							<Path x:Name="arrow" Stroke="#666" StrokeThickness="2" HorizontalAlignment="Center" VerticalAlignment="Center" SnapsToDevicePixels="false" Data="M 1,1.5 L 4.5,5 L 8,1.5"/>
							<ContentPresenter HorizontalAlignment="Left" Margin="4,0,0,0" VerticalAlignment="Center" SnapsToDevicePixels="True" RecognizesAccessKey="True" Grid.Column="1"/>
						</Grid>
					</Border>
					<ControlTemplate.Triggers>
						<Trigger Property="IsChecked" Value="true">
							<Setter Property="Data" TargetName="arrow" Value="M 1,4.5  L 4.5,1  L 8,4.5"/>
						</Trigger>
						<Trigger Property="IsMouseOver" Value="true">
							<Setter Property="Stroke" TargetName="arrow" Value="#222"/>
						</Trigger>
						<Trigger Property="IsPressed" Value="true">
							<Setter Property="Stroke" TargetName="arrow" Value="#FF003366"/>
						</Trigger>
					</ControlTemplate.Triggers>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>
	<Style x:Key="OtherItemsExpander" TargetType="{x:Type Expander}">
        <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
        <Setter Property="VerticalContentAlignment" Value="Stretch"/>
        <Setter Property="BorderBrush" Value="Transparent"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="Template">
        	<Setter.Value>
        		<ControlTemplate TargetType="{x:Type Expander}">
        			<Border SnapsToDevicePixels="true" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" CornerRadius="3">
        				<StackPanel>
        					<ContentPresenter 
                                x:Name="ExpandSite" 
                                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" 
                                Margin="{TemplateBinding Padding}" 
                                VerticalAlignment="{TemplateBinding VerticalContentAlignment}" 
                                Focusable="false" 
                                Visibility="Collapsed"
                                />
                            <!--
                            <UIElements:ResizeThumb 
                                TargetElement="{Binding ElementName=ExpandSite}" 
                                IsVerticalSizer="True" 
                                Height="4" 
                                Background="Blue" 
                                Visibility="{Binding ElementName=ExpandSite, Path=Visibility}"
                                />
                            -->
        					<ToggleButton 
                                x:Name="HeaderSite" 
                                Margin="1" 
                                MinHeight="0" 
                                MinWidth="0" 
                                Content="{TemplateBinding Header}" 
                                ContentTemplate="{TemplateBinding HeaderTemplate}" 
                                ContentTemplateSelector="{TemplateBinding HeaderTemplateSelector}" 
                                FontFamily="{TemplateBinding FontFamily}" 
                                FontSize="{TemplateBinding FontSize}" 
                                FontStretch="{TemplateBinding FontStretch}" 
                                FontStyle="{TemplateBinding FontStyle}" 
                                FontWeight="{TemplateBinding FontWeight}" 
                                Foreground="{TemplateBinding Foreground}"
                                HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" 
                                Padding="{TemplateBinding Padding}" 
                                VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" 
                                IsChecked="{Binding IsExpanded, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" 
                                BorderThickness="0">
        						<ToggleButton.Style>
        							<Style TargetType="{x:Type ToggleButton}">
        								<Setter Property="Template">
        									<Setter.Value>
        										<ControlTemplate TargetType="{x:Type ToggleButton}">
        											<Border Padding="{TemplateBinding Padding}">
        												<Grid SnapsToDevicePixels="False" Background="Transparent" Margin="-1">
        													<Grid.ColumnDefinitions>
        														<ColumnDefinition Width="19"/>
        														<ColumnDefinition Width="*"/>
        													</Grid.ColumnDefinitions>
        													<Border HorizontalAlignment="Left" Margin="0" Width="100" Background="White" BorderBrush="{DynamicResource OtherItemsBackgorund}" CornerRadius="0,0,5,5" Grid.Column="0" Grid.ColumnSpan="2">
        														<Border.Effect>
        															<DropShadowEffect Opacity="0.25"/>
        														</Border.Effect>
        													</Border>
        													<Path x:Name="arrow" Stroke="#666" StrokeThickness="2" HorizontalAlignment="Center" VerticalAlignment="Center" SnapsToDevicePixels="false" Data="M 1,1.5 L 4.5,5 L 8,1.5"/>
        													<ContentPresenter HorizontalAlignment="Left" Margin="4,0,0,0" VerticalAlignment="Center" SnapsToDevicePixels="True" RecognizesAccessKey="True" Grid.Column="1"/>
        												</Grid>
        											</Border>
        											<ControlTemplate.Triggers>
        												<Trigger Property="IsChecked" Value="true">
        													<Setter Property="Data" TargetName="arrow" Value="M 1,4.5  L 4.5,1  L 8,4.5"/>
        												</Trigger>
        												<Trigger Property="IsMouseOver" Value="true">
        													<Setter Property="Stroke" TargetName="arrow" Value="#222"/>
        												</Trigger>
        												<Trigger Property="IsPressed" Value="true">
        													<Setter Property="Stroke" TargetName="arrow" Value="#FF003366"/>
        												</Trigger>
        											</ControlTemplate.Triggers>
        										</ControlTemplate>
        									</Setter.Value>
        								</Setter>
        							</Style>
        						</ToggleButton.Style>
        						<ToggleButton.FocusVisualStyle>
        							<Style>
        								<Setter Property="Control.Template">
        									<Setter.Value>
        										<ControlTemplate>
        											<Border>
        												<Rectangle Stroke="Black" StrokeDashArray="1 2" StrokeThickness="1" Margin="0" SnapsToDevicePixels="true"/>
        											</Border>
        										</ControlTemplate>
        									</Setter.Value>
        								</Setter>
        							</Style>
        						</ToggleButton.FocusVisualStyle>
        					</ToggleButton>
                        </StackPanel>
        			</Border>
        			<ControlTemplate.Triggers>
        				<Trigger Property="IsExpanded" Value="true">
        					<Setter Property="Visibility" TargetName="ExpandSite" Value="Visible"/>
        					<Setter Property="Margin" TargetName="ExpandSite" Value="0,4,0,0"/>
        				</Trigger>
        				<Trigger Property="ExpandDirection" Value="Right">
        					<Setter Property="DockPanel.Dock" TargetName="ExpandSite" Value="Right"/>
        					<Setter Property="DockPanel.Dock" TargetName="HeaderSite" Value="Left"/>
        					<Setter Property="Style" TargetName="HeaderSite">
        						<Setter.Value>
        							<Style TargetType="{x:Type ToggleButton}">
        								<Setter Property="Template">
        									<Setter.Value>
        										<ControlTemplate TargetType="{x:Type ToggleButton}">
        											<Border Padding="{TemplateBinding Padding}">
        												<Grid SnapsToDevicePixels="False" Background="Transparent">
        													<Grid.RowDefinitions>
        														<RowDefinition Height="19"/>
        														<RowDefinition Height="*"/>
        													</Grid.RowDefinitions>
        													<Grid>
        														<Grid.LayoutTransform>
        															<TransformGroup>
        																<TransformGroup.Children>
        																	<TransformCollection>
        																		<RotateTransform Angle="-90"/>
        																	</TransformCollection>
        																</TransformGroup.Children>
        															</TransformGroup>
        														</Grid.LayoutTransform>
        														<Ellipse x:Name="circle" Stroke="DarkGray" HorizontalAlignment="Center" VerticalAlignment="Center" Width="19" Height="19"/>
        														<Path x:Name="arrow" Stroke="#666" StrokeThickness="2" HorizontalAlignment="Center" VerticalAlignment="Center" SnapsToDevicePixels="false" Data="M 1,1.5 L 4.5,5 L 8,1.5"/>
        													</Grid>
        													<ContentPresenter HorizontalAlignment="Center" Margin="0,4,0,0" VerticalAlignment="Top" SnapsToDevicePixels="True" RecognizesAccessKey="True" Grid.Row="1"/>
        												</Grid>
        											</Border>
        											<ControlTemplate.Triggers>
        												<Trigger Property="IsChecked" Value="true">
        													<Setter Property="Data" TargetName="arrow" Value="M 1,4.5  L 4.5,1  L 8,4.5"/>
        												</Trigger>
        												<Trigger Property="IsMouseOver" Value="true">
        													<Setter Property="Stroke" TargetName="circle" Value="#FF3C7FB1"/>
        													<Setter Property="Stroke" TargetName="arrow" Value="#222"/>
        												</Trigger>
        												<Trigger Property="IsPressed" Value="true">
        													<Setter Property="Stroke" TargetName="circle" Value="#FF526C7B"/>
        													<Setter Property="StrokeThickness" TargetName="circle" Value="1.5"/>
        													<Setter Property="Stroke" TargetName="arrow" Value="#FF003366"/>
        												</Trigger>
        											</ControlTemplate.Triggers>
        										</ControlTemplate>
        									</Setter.Value>
        								</Setter>
        							</Style>
        						</Setter.Value>
        					</Setter>
        				</Trigger>
        				<Trigger Property="ExpandDirection" Value="Up">
        					<Setter Property="DockPanel.Dock" TargetName="ExpandSite" Value="Top"/>
        					<Setter Property="DockPanel.Dock" TargetName="HeaderSite" Value="Bottom"/>
        					<Setter Property="Style" TargetName="HeaderSite">
        						<Setter.Value>
        							<Style TargetType="{x:Type ToggleButton}">
        								<Setter Property="Template">
        									<Setter.Value>
        										<ControlTemplate TargetType="{x:Type ToggleButton}">
        											<Border Padding="{TemplateBinding Padding}">
        												<Grid SnapsToDevicePixels="False" Background="Transparent">
        													<Grid.ColumnDefinitions>
        														<ColumnDefinition Width="19"/>
        														<ColumnDefinition Width="*"/>
        													</Grid.ColumnDefinitions>
        													<Grid>
        														<Grid.LayoutTransform>
        															<TransformGroup>
        																<TransformGroup.Children>
        																	<TransformCollection>
        																		<RotateTransform Angle="180"/>
        																	</TransformCollection>
        																</TransformGroup.Children>
        															</TransformGroup>
        														</Grid.LayoutTransform>
        														<Ellipse x:Name="circle" Stroke="DarkGray" HorizontalAlignment="Center" VerticalAlignment="Center" Width="19" Height="19"/>
        														<Path x:Name="arrow" Stroke="#666" StrokeThickness="2" HorizontalAlignment="Center" VerticalAlignment="Center" SnapsToDevicePixels="false" Data="M 1,1.5 L 4.5,5 L 8,1.5"/>
        													</Grid>
        													<ContentPresenter HorizontalAlignment="Left" Margin="4,0,0,0" VerticalAlignment="Center" SnapsToDevicePixels="True" RecognizesAccessKey="True" Grid.Column="1"/>
        												</Grid>
        											</Border>
        											<ControlTemplate.Triggers>
        												<Trigger Property="IsChecked" Value="true">
        													<Setter Property="Data" TargetName="arrow" Value="M 1,4.5  L 4.5,1  L 8,4.5"/>
        												</Trigger>
        												<Trigger Property="IsMouseOver" Value="true">
        													<Setter Property="Stroke" TargetName="circle" Value="#FF3C7FB1"/>
        													<Setter Property="Stroke" TargetName="arrow" Value="#222"/>
        												</Trigger>
        												<Trigger Property="IsPressed" Value="true">
        													<Setter Property="Stroke" TargetName="circle" Value="#FF526C7B"/>
        													<Setter Property="StrokeThickness" TargetName="circle" Value="1.5"/>
        													<Setter Property="Stroke" TargetName="arrow" Value="#FF003366"/>
        												</Trigger>
        											</ControlTemplate.Triggers>
        										</ControlTemplate>
        									</Setter.Value>
        								</Setter>
        							</Style>
        						</Setter.Value>
        					</Setter>
        				</Trigger>
        				<Trigger Property="ExpandDirection" Value="Left">
        					<Setter Property="DockPanel.Dock" TargetName="ExpandSite" Value="Left"/>
        					<Setter Property="DockPanel.Dock" TargetName="HeaderSite" Value="Right"/>
        					<Setter Property="Style" TargetName="HeaderSite">
        						<Setter.Value>
        							<Style TargetType="{x:Type ToggleButton}">
        								<Setter Property="Template">
        									<Setter.Value>
        										<ControlTemplate TargetType="{x:Type ToggleButton}">
        											<Border Padding="{TemplateBinding Padding}">
        												<Grid SnapsToDevicePixels="False" Background="Transparent">
        													<Grid.RowDefinitions>
        														<RowDefinition Height="19"/>
        														<RowDefinition Height="*"/>
        													</Grid.RowDefinitions>
        													<Grid>
        														<Grid.LayoutTransform>
        															<TransformGroup>
        																<TransformGroup.Children>
        																	<TransformCollection>
        																		<RotateTransform Angle="90"/>
        																	</TransformCollection>
        																</TransformGroup.Children>
        															</TransformGroup>
        														</Grid.LayoutTransform>
        														<Ellipse x:Name="circle" Stroke="DarkGray" HorizontalAlignment="Center" VerticalAlignment="Center" Width="19" Height="19"/>
        														<Path x:Name="arrow" Stroke="#666" StrokeThickness="2" HorizontalAlignment="Center" VerticalAlignment="Center" SnapsToDevicePixels="false" Data="M 1,1.5 L 4.5,5 L 8,1.5"/>
        													</Grid>
        													<ContentPresenter HorizontalAlignment="Center" Margin="0,4,0,0" VerticalAlignment="Top" SnapsToDevicePixels="True" RecognizesAccessKey="True" Grid.Row="1"/>
        												</Grid>
        											</Border>
        											<ControlTemplate.Triggers>
        												<Trigger Property="IsChecked" Value="true">
        													<Setter Property="Data" TargetName="arrow" Value="M 1,4.5  L 4.5,1  L 8,4.5"/>
        												</Trigger>
        												<Trigger Property="IsMouseOver" Value="true">
        													<Setter Property="Stroke" TargetName="circle" Value="#FF3C7FB1"/>
        													<Setter Property="Stroke" TargetName="arrow" Value="#222"/>
        												</Trigger>
        												<Trigger Property="IsPressed" Value="true">
        													<Setter Property="Stroke" TargetName="circle" Value="#FF526C7B"/>
        													<Setter Property="StrokeThickness" TargetName="circle" Value="1.5"/>
        													<Setter Property="Stroke" TargetName="arrow" Value="#FF003366"/>
        												</Trigger>
        											</ControlTemplate.Triggers>
        										</ControlTemplate>
        									</Setter.Value>
        								</Setter>
        							</Style>
        						</Setter.Value>
        					</Setter>
        				</Trigger>
        				<Trigger Property="IsEnabled" Value="false">
        					<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
        				</Trigger>
        			</ControlTemplate.Triggers>
        		</ControlTemplate>
        	</Setter.Value>
        </Setter>
    </Style>
</ResourceDictionary>